#ifndef OPERATIONWIDGET_H
#define OPERATIONWIDGET_H

#include <QWidget>
#include<QTcpSocket>
#include<QTimer>
#include "audio.h"
#include "speech.h"


namespace Ui {
class operationWidget;
}

class operationWidget : public QWidget
{
    Q_OBJECT

public:
    explicit operationWidget(QWidget *parent = 0);
    ~operationWidget();
private slots:
    void recvData();
    void sendData();
    //void net_connected();
    void net_disconnected();
    void pic_disconnected();
    void pic_recv();
    void pic_send();

    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

    void on_pushButton_3_clicked();

    void on_pushButton_4_clicked();

    void on_pushButton_5_clicked();

    void on_pushButton_6_pressed();

    void on_pushButton_6_released();

    void on_pushButton_7_clicked();

private:
    Ui::operationWidget *ui;

    QTcpSocket *pic_socket;
    QTcpSocket *env_socket;
    QTimer *pic_time;
    QTimer *env_time;
    int piclen;
    int flag=1;
    QByteArray pic;
    QPixmap pix;
    QString ip="192.168.51.225";
    int port=8989;
    bool stoped;
    int tmp;
    int hum;
    int light;


    audio *Audio;

};

#endif // OPERATIONWIDGET_H
